<?php echo $this->Html->script('app/menu_admin.js'); ?>

<div class="pageheader">
	<h1 class="pagetitle">Usuário</h1>
	<span class="pagedesc"></span>
</div>

<div id="contentwrapper" class="contentwrapper">
	<div class="msghead_menu">
		<ul>
			<?php if($this->AclLink->check('Usuarios.edit')){ ?>
				<li><?php echo $this->Html->link('Editar', array('action' => 'edit', $usuario['Usuario']['id']), array()); ?></li>
			<?php } ?>
			<?php if($this->AclLink->check('Usuarios.delete')){ ?>
				<li><?php echo $this->Form->postLink(
					'Deletar',
					array('action' => 'delete', $usuario['Usuario']['id']),
					array('confirm' => 'Você tem certeza?', 'escape' => false));
				?></li>
			<?php } ?>
			<li><?php echo $this->Html->link('Voltar', array('action' => 'index'), array()); ?></li>
		</ul>
	</div>
	</br></br>

	<?php echo $this->Form->create('Usuario', array('class' => 'stdform stdform2')); ?>

	<p class="first">
		<label class="less">Perfil</label>
		<span class="field medium">&nbsp;
			<?php echo $this->Html->link($usuario['Perfil']['nome'], array('controller' => 'perfis', 'action' => 'view', $usuario['Perfil']['id'])); ?>
		</span>
	</p>

	<p>
		<label class="less">Email</label>
		<span class="field medium">&nbsp;
			<?php echo h($usuario['Usuario']['email']); ?>
		</span>
	</p>

	<p>
		<label class="less">Login</label>
		<span class="field medium">&nbsp;
			<?php echo h($usuario['Usuario']['username']); ?>
		</span>
	</p>

	<p>
		<label class="less">Ativo</label>
		<span class="field medium">&nbsp;
			<?php echo $usuario['Usuario']['ativo'] ? "Sim" : "Não"; ?>
		</span>
	</p>

	<p>
		<label class="less">Criado em</label>
		<span class="field medium">&nbsp;
			<?php echo $this->Time->format('d/m/Y H:i:s', $usuario['Usuario']['created']); ?>
		</span>
	</p>

	<p>
		<label class="less">Modificado em</label>
		<span class="field medium">&nbsp;
			<?php echo $this->Time->format('d/m/Y H:i:s', $usuario['Usuario']['modified']); ?>
		</span>
	</p>
</div>